package com.xue.test;

import java.io.IOException;
import java.nio.file.Files;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

/**
 * 
 * @author 北京八维博大科技 薛建新
 * @date 2022年11月8日 13:58:02
 * @Copyright 北京八维博大科技
 */
@Qualifier("hello")
@Service("hello")
public class Hello {

	public Hello() {
		System.out.println("Hello init printClassLoader=======================================");
		ClassLoader cl = this.getClass().getClassLoader();
		while (null != cl) {
			System.out.println(cl.getName()+":"+cl.getClass().toString());
			cl = cl.getParent();
		}
		System.out.println("Hello init over!!!!!!");

	}

	public void say(String name) {
		System.out.println("hello  " + name + "!!!");
		try {
			System.out.write( this.getClass().getResourceAsStream("hello.txt").readAllBytes());
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
